package chapter5;

public class ManagerTest {
    public static void main(String[] args) {
        Manager boss = new Manager("Carl Cracker",80000,1987,12,15);
        boss.setBonus(5000);

        Employee[] staff = new Employee[3];
        staff[0] = boss;//父类引用变量可以引用 子类对象
        staff[1] = new Employee("Harry Hacker",50000,1987,10,1);
        staff[2] = new Employee("Tommy Tester",40000,1990,3,15);

        ;
        for (Employee e:staff) {
            System.out.println("name="+e.getName()+",salary="+e.getSalary());
        }
    }
}
